package com.cy1;

import jdk.swing.interop.SwingInterOpUtils;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class StringDemo {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s="陈勇爱袁湘";
        byte[] bys = s.getBytes("GBK");
        System.out.println(Arrays.toString(bys));

        String gbk = new String(bys, "GBK");
        System.out.println(gbk);

    }
}
